<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<html>
<head>
	<base href="<%=request.getContextPath()+"/"%>">
	<title>无标题文档</title>
	<link href="css/style.css" rel="stylesheet" type="text/css" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
	<link href="css/select.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/jquery.idTabs.min.js"></script>
	<script type="text/javascript" src="js/select-ui.min.js"></script>
	<script type="text/javascript" src="editor/kindeditor.js"></script>
	<script type="text/javascript">
		$(document).ready(function(e) {
			$(".select1").uedSelect({
				width : 345
			});
		});
	</script>

	<script type="text/javascript">
		// 获取页面初始化数据
		$(function () {
			// 获取页面初始化数据
			/*$.get("ptu/EmployeeServlet?method=empFindMgr", function (result) {
				for (var i in result) {
					$("#mgrid").append("<option value='" + result[i].empId + "'>" + result[i].realName + "</option>")
				}
			}, "json")*/

			/*$.get("ptu/DeptServlet?method=deptFindAll1", function (result) {
				for (var  i in result) {
					$("#dept").append("<option value='" + result[i].deptno + "'>" + result[i].deptname + "</option>")
				}
			}, "json")*/

			/*$.get("ptu/PositionServlet?method=positionFindAll1", function (result) {
				for (var  i in result) {
					$("#position").append("<option value='" + result[i].posid + "' >" + result[i].pname + "</option>")
				}
			}, "json")*/
		})
	</script>
</head>

	<body>

		<div class="place">
			<span>位置：</span>
			<ul class="placeul">
				<li><a href="#">人事管理</a></li>
				<li><a href="#">修改员工信息</a></li>
			</ul>
		</div>

		<div class="formbody">

			<div class="formtitle"><span>基本信息</span></div>

			<form action="ptu/EmployeeServlet?method=empChange" method="post">
				<ul class="forminfo">
					<li>
						<label>用户名</label>
						<input name="empId" type="text" class="dfinput" value="${emp.empId}"/><i>必须唯一</i></li>
					<li>
					<li>
						<label>真实姓名</label>
						<input name="realName" type="text" class="dfinput" value="${emp.realName}"/><i></i></li>
					<li>
						<label>性别</label><cite>
						<c:if test="${emp.sex == 1}">
						<input name="sex" type="radio" value="1" checked="checked"/>男&nbsp;&nbsp;&nbsp;&nbsp;
						<input name="sex" type="radio" value="0"/>女</cite>
						</c:if>
						<c:if test="${emp.sex == 0}">
							<input name="sex" type="radio" value="1"/>男&nbsp;&nbsp;&nbsp;&nbsp;
							<input name="sex" type="radio" value="0" checked="checked"/>女</cite>
						</c:if>
					</li>
					<li>
						<label>出生日期</label>
						<input name="birthDate" value='<fmt:formatDate value="${emp.birthDate}" pattern="yyyy-MM-dd"></fmt:formatDate>' type="text" class="dfinput" onfocus="WdatePicker({skin:'whyGreen',lang:'en'})" /></li>
					<li>
					<li>
						<label>入职时间</label>
						<input name="hireDate"  value='<fmt:formatDate value="${emp.hireDate}" pattern="yyyy-MM-dd"></fmt:formatDate>' type="text" class="dfinput" onfocus="WdatePicker()"/><i></i></li>
					<li>
						<label>离职时间</label>
						<input name="leaveDate" value='<fmt:formatDate value="${emp.leaveDate}" pattern="yyyy-MM-dd"></fmt:formatDate>' type="text" class="dfinput" onfocus="WdatePicker()"/><i></i></li>
					<li>
						<label>是否在职</label><cite>
						<c:if test="${emp.onDuty == 1}">
						<input name="onDuty" type="radio" value="1" checked="checked"/>是&nbsp;&nbsp;&nbsp;&nbsp;
						<input name="onDuty" type="radio" value="0"/>否</cite>
						</c:if>
						<c:if test="${emp.onDuty == 0}">
							<input name="onDuty" type="radio" value="1"/>是&nbsp;&nbsp;&nbsp;&nbsp;
							<input name="onDuty" type="radio" value="0" checked="checked"/>否</cite>
						</c:if>
					</li>
					<li>
						<label>所属部门<b>*</b></label>
						<div class="vocation">
							<select class="select1" id="dept" name="deptno">
								<c:forEach items="${requestScope.deptList}" var="dList">
									<option value="${dList.deptno}"
											<c:if test="${dList.deptno == emp.deptno}">selected</c:if>
									>
										${dList.deptname}
									</option>
								</c:forEach>
							</select>
						</div>
					</li>
					<li>
						<label>所属岗位<b>*</b></label>
						<div class="vocation">
							<select class="select1" id="position" name="posid">
								<c:forEach items="${requestScope.posList}" var="pList">
									<option value="${pList.posid}"
											<c:if test="${pList.posid == emp.posid}">selected</c:if>
									>
											${pList.pname}
									</option>
								</c:forEach>
							</select>
						</div>
					</li>
					<li>
						<label>直接上级<b>*</b></label>
						<div class="vocation">
							<select class="select1" id="mgrid" name="mgrid">
								<c:forEach items="${requestScope.mgrList}" var="mList">
									<option value="${mList.empId}"
											<c:if test="${mList.empId == emp.mgrid}">selected</c:if>
									>
											${mList.realName}
									</option>
								</c:forEach>
							</select>
						</div>
					</li>
					<li>
						<label>联系方式</label>
						<input name="phone" type="text" class="dfinput" value="${emp.phone}"/>
					</li>
					<li>
						<label>QQ号</label>
						<input name="qq" type="text" class="dfinput" value="${emp.qq}"/>
					</li>
					<li>
						<label>紧急联系人信息</label>
						<textarea name="emerContactPerson" cols="" rows="" class="textinput">${emp.emerContactPerson}</textarea>
					</li>
					<li>
						<label>身份证号</label>
						<input name="idCard" type="text" class="dfinput" value="${emp.idCard}"/>
					</li>
					<li>
						<label>&nbsp;</label>
						<input type="submit" class="btn" value="确认保存"/>
					</li>
				</ul>
			</form>

		</div>

	</body>

</html>